from interface import db_interface, host_interface, vpn_interface, other_interface

HOST_OPERATION_DICT = {
    "修改未知从账号-sql": [host_interface.unknown_account, "左侧传入: 主机ip 从账号",
                           "例:10.0.0.1 root\n10.0.0.2 root\n10.0.0.3 toptea"],
    "修改主机版本为Centos7-sql": [host_interface.host_version, "左侧传入: 主机ip ",
                                  "例:10.179.14.49\n10.179.14.61\n10.179.14.83"],
    "证书无法点击-sql": [host_interface.change_certificate, "左侧传入: 主机ip 从账号",
                             "例:10.179.14.49\n10.179.14.61\n10.179.14.83"],
    "修改主机状态为未初始化-sql": [host_interface.host_status, "左侧传入: 主机ip ",
                         "例:10.179.14.49\n10.179.14.61\n10.179.14.83"]
}
DB_OPERATION_DICT = {
    "数据库账号密码查询-sql": [db_interface.info_query, "左侧传入:库名 ip或域名 端口 从账号", "数据库信息错误将查询不到，注意查询出的 数据条数 是否正确"],
    # "数据库配置密码-sql": [db_interface.set_password, "左侧传入:库名 ip或域名 端口 从账号 加密密码", "建议执行后 再批量查询密码确定下 确认无误后提交"],
    "数据库配置密码-sql": [db_interface.set_password_simple, "左侧传入:从账号 db_id 加密密码", "建议执行后 再批量查询密码确定下 确认无误后提交"]
}
VPN_OPERATION_DICT = {
    "VPN短信下发查询(外网)-Linux命令": [vpn_interface.SMS_wan_qurey, "VPN短信下发服务器：10.70.238.219\n左侧传入:手机号", "例:13555555555"],
    "VPN短信下发查询(内网)-Linux命令": [vpn_interface.SMS_qurey, "VPN短信下发服务器：10.70.238.219\n左侧传入:手机号", "例:13555555555"],
    "邮箱不一致（修改为OA邮箱）-sql": [vpn_interface.different_mailbox_OA, "左侧传入:用户名", "例:libingli"],
    "邮箱不一致（修改为其他邮箱）-sql": [vpn_interface.different_mailbox_other, "左侧传入:用户名 邮箱", "例:libingli libingli@qq.com"],
    "工单报错没有当前用户-sql": [vpn_interface.no_current_user, "左侧传入:用户名", "例:libingli"],
}
OTHER_OPERATION_DICT = {
    "待定": [None, "待定", "例:待定"]
}

TYPE_DICT = {
    "主机": HOST_OPERATION_DICT,
    "数据库": DB_OPERATION_DICT,
    "VPN证书": VPN_OPERATION_DICT,
    "其他": OTHER_OPERATION_DICT,
}
